package cc.magicjson.example.demo.arithmetic;

import java.util.Arrays;
import java.util.List;
import java.util.Objects;

public class TwoDimensionalArrayExample {
    public static void main(String[] args) {
        
        List<Integer> integerList = Arrays.asList(1,2,2,3);
        for (Integer i : integerList) {
            
        }
        
        
        int[][] matrix = {
            {1, 2, 3},
            {4, 5, 6},
            {7, 8, 9}
        };

        int [][] dp = new int [3][3];
        dp[0][0] = 0;
        Arrays.stream(dp).map(arry -> Arrays.stream(arry)
                .mapToObj(operand -> String.valueOf(operand)))
                .forEach(System.out::println);

        // 访问和打印二维数组元素
        for (int i = 0; i < matrix.length; i++) {
            for (int j = 0; j < matrix[i].length; j++) {
                System.out.print(matrix[i][j] + " ");
            }
            System.out.println();
        }
    }
}
